package org.colin.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.colin.dictPojo.DEntry;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 词条表 服务类
 * </p>
 *
 * @author LiRuiFeng
 * @since 2021-01-09
 */
public interface DEntryService extends IService<DEntry> {

    int selectCountByTableName(Integer id);


    boolean addEntry(DEntry dEntry, List<JSONObject> videoList, List<JSONObject> imageList ,  List<JSONObject> phraseList );


    boolean updateEntry(DEntry dEntry, List<JSONObject> videoList, List<JSONObject> imageList  , List<JSONObject> phraseList);

    boolean deleteEntry(List<Integer> id, Integer language);

    HashMap selectEntryById(Integer id, Integer language);

    IPage<HashMap> selectEntryIsPage(Page<HashMap> pageE, String param, Integer strokes, Integer hsk, Integer language, Integer convType);

    int selectCountByLevel(Integer id);

    HashMap<String, Object> indexSearchByPinYin(Integer language, Integer studyLevel);

    boolean updateEntryByAppr(List<Integer> ids, Integer language, Integer appr, Integer releaseState);



    Map<String, Object> indexSearchByPinYinDetail(Integer language, Integer studyLevel, String pinyin);

    List indexSearchByStrokes(Integer language, Integer studyLevel);

    List indexSearchByStrokesDetail(Integer language, Integer studyLevel, Integer strokes);

    List indexSearchByParam(Integer language, Integer studyLevel, String param);

    List daySubject(Integer language, Integer studyLevel, Integer num, String userName);

    List selectSubjectByEnterId(Integer id, Integer language);

    List entryStudy(Integer language, Integer studyLevel, String userName);

    List<HashMap> selectUserCollection(Page<HashMap> pageE, Integer language, String userName);

    boolean updateBatchEntryHsk(List<Integer> ids, Integer language, Integer hsk);
}
